﻿namespace Pna.Console
{
    using System;

    using Castle.Facilities.Logging;
    using Castle.MicroKernel.Registration;
    using Castle.Windsor;

    using Pna.Framework;
    using Pna.InfoSource.Sbb;

    public class Program
    {
        public static void Main(string[] args)
        {
            //if(args.Length == 0)
            //{
            //    throw new ArgumentException("Must pass at least one argument!");
            //}
            
            //Console.WriteLine("Initializing engines...");
            //var recog = new RecognizerEngine();
            //var speech = new SpeechSynthesizerEngine();

            //recog.Heard += speech.Talk;
            //recog.Initialize(args);

            //Console.WriteLine("Finished init.. Say something of:");
            //foreach (var s in args)
            //{
            //    Console.WriteLine(s);
            //}

            var container = new WindsorContainer();
            container.AddFacility<LoggingFacility>(f => f.UseNLog("NLog.config"));
            container.Register(Component.For<IPnaExtension>().ImplementedBy<SbbInfoExtension>());

            var bootstrapper = new PnaBootstrapper(container);
            
            Console.WriteLine("Press any key to finish.");
            Console.ReadKey();
        }
    }
}
